import logo from './logo.svg';
import './App.css';

const list = [
    {id: 1001, name: 'Vue'},
    {id: 1002, name: 'React'},
    {id: 1003, name: 'Angular'}
]

function App() {

    function clickHandler() {
        console.log("button按钮点击了")
    }
    function clickHandler2(name) {
        console.log("button按钮点击了", name)
    }
    function clickHandler3(name, event) {
        console.log("button按钮点击了", name, event)
    }

    return (
        <div>
            <button onClick={clickHandler}>click me</button>
            <button onClick={()=>clickHandler2('张三')}>click me 传参</button>
            <button onClick={(event)=>clickHandler3('张三', event)}>click me 同时传递事件对象</button>
        </div>
    );
}

export default App;
